knitr::opts_chunk$set(echo = TRUE)
# Load libraries
library(leaflet) # interactive maps
library(leaflet.extras) # extra leaflet functions
## Warning: package 'leaflet.extras' was built under R version 4.3.3
library(leaflet.extras2) # extra leaflet functions
library(stars) # for raster and spatiotemporal data
## Loading required package: abind
## Loading required package: sf
## Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
library(esri2sf) # ArcGIS FeatureServer -> sf
library(leaflet.providers) # leaflet basemaps
library(sf) # spatial data
library(rnaturalearth) # Natural Earth basemap
# Leaflet expects WGS84 lon/lat
target_crs <- 4326
This map below shows the recent earthquakes around the world and the active fault lines.